import { Controller, Get, Headers, Body, Patch, Param, Delete, HttpCode, Query, UseGuards } from '@nestjs/common';
import { BannerService } from './banner.service';
import { AuthGuard } from '@nestjs/passport';
import { ApiResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { BannerResult } from 'src/modules/admin/banner/entities/banner.entity';
@ApiTags('轮播图')
@Controller('home/banner')
export class BannerController {
  constructor(private readonly bannerService: BannerService) { }
  /** 轮播图 */
  @HttpCode(200)
  @Get('/getBannerList')
  @ApiResponse({
    status: 200,
    description: '轮播图列表',
    type: BannerResult,
  })
  @ApiOperation({
    tags: ['获取轮播图'],
    summary: '获取轮播图',
    operationId: 'getBannerList',
  })
  getBannerList(@Headers('lang') lang: string) {
    return this.bannerService.getBannerList(lang);
  }
}
